<?php
/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * @Date: 2022-01-27 16:11:48
 * @LastEditors: Sam
 * @LastEditTime: 2022-04-15 18:11:26
 */
namespace app\admin\model;
use think\Model;


class UserCertificate extends BaseModel {
    
   
    /**
     * 数据表主键
     * @var string
     */

    protected $pk = 'id';

    
     /**
     * 模型名称
     * @var string
     */
    protected $table= 'original_user_certificate';


    /**
     * 获取查询条件
     * @param $where
     * @param string $alert
     * @param null $model
     * @return SystemUserLevel|null
     */
    public static function setWhere($where,$alert='',$model=null)
    {
        $model=$model===null ? new self() : $model;
        return $model;
    }

    public function user(){
        return $this->belongsTo(User::class,'uid');
    }

    public function order(){
        return $this->belongsTo(Order::class,'order_id');
    }


    public function artist(){
        return $this->belongsTo(Artist::class,'artist_id');
    }

    public function goods(){
        return $this->belongsTo(Goods::class,'goods_id');
    }
   
}

